﻿// Copyright (c)  MOKEYISH. All rights reserved.
// Licensed under the MIT License, See License.txt in the project root for license information.

using System.Data;
using System.IO;

namespace NSQL.Extensions
{
    public static class DataTableExtensions
    {
        public static string GetXml(this DataTable dt)
        {
            var sw = new StringWriter();
            dt.WriteXmlSchema(sw);
            sw.WriteLine();
            dt.WriteXml(sw);
            return sw.ToString();
        }
    }
}